package org.jeecg.modules.outbound.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.common.system.vo.SelectTreeModel;
import org.jeecg.config.mybatis.BaseMapperPlus;
import org.jeecg.modules.outbound.entity.BussOutboundOrderDetail;
import org.jeecg.modules.outbound.vo.BussOutboundOrderDetailPage;
import org.jeecg.modules.outbound.vo.BussOutboundOrderDetailVo;

import java.util.List;
import java.util.Map;

/**
 * @Description: 出库单明细
 * @Author: jeecg-boot
 * @Date:   2024-06-19
 * @Version: V1.0
 */
public interface BussOutboundOrderDetailMapper extends BaseMapperPlus<BussOutboundOrderDetail> {

	/**
	 * 编辑节点状态
	 * @param id
	 * @param status
	 */
	void updateTreeNodeStatus(@Param("id") String id,@Param("status") String status);

	/**
	 * 【vue3专用】根据父级ID查询树节点数据
	 *
	 * @param pid
	 * @param query
	 * @return
	 */
	List<SelectTreeModel> queryListByPid(@Param("pid") String pid, @Param("query") Map<String, String> query);

	public boolean deleteByMainId(@Param("mainId") String mainId);

	public List<BussOutboundOrderDetailVo> selectByMainId(@Param("mainId") String mainId);

	public List<BussOutboundOrderDetailVo> selectByPid(@Param("mainId") String mainId,@Param("materialId") String materialId);

	public List<BussOutboundOrderDetail> selectForPrint(@Param("mainId") String mainId);

	public List<BussOutboundOrderDetail> selectByInfoId(@Param("mainId") String mainId);

	public List<BussOutboundOrderDetail> selectByInventory(@Param("inventoryId") String inventoryId);

	public List<BussOutboundOrderDetail> selectByStorage(@Param("noticeId") String noticeId);

	IPage<BussOutboundOrderDetailPage> detailPage(Page<BussOutboundOrderDetailPage> page, @Param(Constants.WRAPPER) QueryWrapper<BussOutboundOrderDetailPage> queryWrapper );

}
